1 <?php
2     include_once
'header.php';
3     ?>
4
5 <style>
6     body {
7         background-color: powderblue;
8     }
9 table,th,td{
10             border: 2px color:transparent;
11             font-family: monospace;
12             font-size:
150%;
13             padding:
0.25cm;
14             background-color: black;
15         }
16         body{
17                 background-image: url(
"images/show.jpg");
18                 -moz-background-size: cover;
19                 -webkit-background-size: cover;
20                  background-size:
100% 110vh;
21                 background-position: top center !important;
22                 background-repeat: no-repeat !important;
23                 background-attachment:
fixed;
24                 color: white;
25                 
26             }
27         
28         button
29         {
30             display: block;
31             margin:
0 auto;
32             width:
10%;
33             height: 40px;
34             border: none;
35             background-color: #
222;
36             font-family: arial;
37             font-size: 16px;
38             color: #fff;
39             cursor: pointer;
40         }
41 </style>
42
43 <body>
44
45     <?php
46
47         
if(isset($_SESSION['khali']))
48         {
49             echo
'<p align=middle style="font-family: monospace; font-size:200%;"><br><br>'.$_SESSION['khali'].'</p>';
50             unset($_SESSION[
'khali']);
51             echo
'<center><a style="font-size: 250%; font-family: monospace;" href="nowshowing.php"><u><br>Back</u><br><br><br></a></center>';
52         }
53
54         elseif(isset($_SESSION[
'seats_out']))
55         {
56             echo
'<p align=middle style="font-family: monospace; font-size:200%;"><br><br>'.$_SESSION['seats_out'].'</p>';
57             unset($_SESSION[
'seats_out']);
58             echo
'<center><a style="font-size: 250%; font-family: monospace;" href="nowshowing.php"><u><br>Back</u><br><br><br></a></center>';
59         }
60
61         elseif(isset($_SESSION[
'seats_remain']))
62         {
63             echo
'<p align=middle style="font-family: monospace; font-size:200%;"><br><br>'.$_SESSION['seats_remain'].'</p>';
64             unset($_SESSION[
'seats_remain']);
65             echo
'<center><a style="font-size: 250%; font-family: monospace;" href="nowshowing.php"><u><br>Back</u><br><br><br></a></center>';
66         }
67
68         elseif(isset($_SESSION[
'succ_book']))
69         {
70             echo
'<p align=middle style="font-family: monospace; font-size:200%;"><br><br>'.$_SESSION['succ_book'].'</p>';
71
72             $dbServername =
"localhost";
73             $dbUsername =
"root";
74             $dbPassword =
"password";
75             $dbName =
"test";
76
77             $conn = mysqli_connect($dbServername, $dbUsername, $dbPassword, $dbName);
78
79             $sql=
"SELECT m.mov_name,t.t_name,t.location,s.time,b.no_of_seats from movie m,theater t,shows s,booking b where m.mov_id=s.mov_id and t.t_id=s.t_id and s.show_id=b.show_id and b.show_id='".$_SESSION['show_id']."' and b.no_of_seats='".$_SESSION['seats']."' order by booking_id desc limit 1";
80
81             mysqli_query($conn, $sql) or die(
'Error');
82             $result = mysqli_query($conn, $sql);
83         
84
85             
while($row=mysqli_fetch_array($result))
86             {
87                     echo
'<br><br><table style="margin-left: auto; margin-right: auto;">
88                                     
89                                     <tr>
90                                         <td><u><b> Movie</b></u></td>
91                                         <td>
'.$row['mov_name'].'</td>
92                                     </tr>
93                                     <tr>
94                                         <td><u><b> Theater</b></u></td>
95                                         <td>
'.$row['t_name'].'</td>
96                                     </tr>
97                                     <tr>
98                                         <td><u><b> Location </b></u></td>
99                                         <td>
'.$row['location'].'</td>
100                                     </tr>
101                                     <tr>
102                                         <td><u><b> Date & Time </b></u></td>
103                                         <td>
'.$row['time'].'</td>
104                                     </tr>
105                                     <tr>
106                                         <td><u><b>Seats</b> </u></td>
107                                         <td>
'.$row['no_of_seats'].'</td>
108                                     </tr>
109                             </table><br><br><br>
';
110                 }
111
112                 echo
'<button onclick="myFunction()">Cancel</button>
113
114                         <p id=
"demo"></p>
115                             <script>
116                                 function myFunction()
117                                 {
118                                     
if (confirm("Are You Sure You wish to cancel the booking?") == true)
119                                     {
120                                         window.location.href =
"cancel.php";
121                                     }
122                                     
else
123                                     {
124                                         window.location.href =
"second.php";
125                                     }
126     
127                                 }
128                             </script>
';
129
130                 
131                 unset($_SESSION[
'succ_book']);
132         }
133         
else
134         {
135             header(
'location: second.php');
136         }
137         
138         
139         
140     ?>
141     
142 </body>
143 <?php
144     include_once
'footer.php';
145 ?>
146 </html>


Gõ tìm kiếm nhanh...